<?php
$path = 'D:/wwwroot/www/dev002.gxyushengwenhua.com/application/api/controller/v1/Share.php';
$data = @file_get_contents($path);
if ($data === false) {
    echo 'ReadError';
    exit(1);
}
$bom = substr($data, 0, 3);
if ($bom === "\xEF\xBB\xBF") {
    echo 'HasBOM';
} else {
    echo 'NoBOM';
}